package cc.shacocloud.mirage.demo.java.service;

import cc.shacocloud.mirage.core.DeployVerticle;
import io.vertx.core.AbstractVerticle;
import lombok.extern.slf4j.Slf4j;

import java.util.concurrent.atomic.AtomicInteger;

/**
 * @author 思追(shaco)
 * @date 2023/3/19
 */
@Slf4j
@DeployVerticle(instances = 2)
public class TestVerticle extends AbstractVerticle {

    private static final AtomicInteger i = new AtomicInteger(0);

    private Integer num;

    @Override
    public void start() throws Exception {
        num = i.incrementAndGet();
        log.info("TestVerticle start {}", num);
    }

    @Override
    public void stop() throws Exception {
        log.info("TestVerticle stop {}", num);

    }
}
